#include "dispatchable.h"
#include "core/dispatcher.h"
#include "core/command.h"

using namespace Commands;
using namespace Commands::Core;

Dispatchable::Dispatchable()
: dispatcher(new Dispatcher)
{}
//-----------------------------------------------------------------------------
Dispatchable::~Dispatchable()
{
    delete dispatcher;
}
//-----------------------------------------------------------------------------
void Dispatchable::Accept(const Inspector& inspector)
{
    dispatcher->Accept(inspector);
}
//-----------------------------------------------------------------------------
void Dispatchable::Live(const float seconds)
{
    dispatcher->Live(seconds);
}
//-----------------------------------------------------------------------------
void Dispatchable::AddCommand(const int queueId, const Command<Dispatcher>& command)
{
    dispatcher->AddCommand(queueId, command);
}
//-----------------------------------------------------------------------------
bool Dispatchable::CommandsEnded(void) const
{
    return dispatcher->CommandsEnded();
}
//-----------------------------------------------------------------------------
bool Dispatchable::CommandsEnded(const int queueId)
{
    return dispatcher->CommandsEnded(queueId);
}
//-----------------------------------------------------------------------------
void Dispatchable::Clear(const int queueId)
{
    dispatcher->Clear(queueId);
}
//-----------------------------------------------------------------------------
void Dispatchable::Clear(void)
{
    dispatcher->Clear();
}
//-----------------------------------------------------------------------------
void Dispatchable::AddCommand(const int queueId, ICommand* const command)
{
    dispatcher->AddCommand(queueId, command);
}
//-----------------------------------------------------------------------------
float Dispatchable::GetData(const int dataId)
{
    return dispatcher->GetData(dataId);
}
//-----------------------------------------------------------------------------
float Dispatchable::GetData(const int queueId, const int dataId)
{
    return dispatcher->GetData(queueId, dataId);
}
//-----------------------------------------------------------------------------
